import { ApiProperty } from '@nestjs/swagger';

class UserInfo {
  @ApiProperty()
  id: number;

  @ApiProperty()
  username: string;

  @ApiProperty()
  nickName: string;

  @ApiProperty({
    example: 'xxx@xxx.com',
  })
  email: string;

  @ApiProperty()
  headPic: string;

  @ApiProperty()
  phoneNumber: string;

  @ApiProperty({ example: false })
  isFrozen: boolean;

  @ApiProperty({ example: false })
  isAdmin: boolean;

  @ApiProperty()
  createTime: Date;

  @ApiProperty({ example: ['管理员', '普通用户'] })
  roles: string[];

  @ApiProperty({ example: ['修改aaa', '修改bbb'] })
  permissions: string[];
}
export class LoginUserVo {
  @ApiProperty()
  userInfo: UserInfo;

  @ApiProperty()
  accessToken: string;

  @ApiProperty()
  refreshToken: string;
}
